package dk.ihk.shopular.models;

import java.util.ArrayList;
import java.util.List;

public class User {
	private String name;
	private String passwordHash;
	private String eMail;
	List<User> friends = new ArrayList<User>();
	List<ShoppingList> shoppingLists = new ArrayList<ShoppingList>();
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPasswordHash() {
		return passwordHash;
	}
	public void setPasswordHash(String passwordHash) {
		this.passwordHash = passwordHash;
	}
	public String geteMail() {
		return eMail;
	}
	public void seteMail(String eMail) {
		this.eMail = eMail;
	}
	
	public void addAsFriend(User user) {
		friends.add(user);
	}
	
	public List<ShoppingList> getShoppingLists() {
		return shoppingLists;
	}
	
	public void addShoppingList(ShoppingList list) {
		shoppingLists.add(list);
	}
	
	public void removeShoppingList(ShoppingList list) {
		shoppingLists.remove(list);
	}
	
	public void addFriendship(User user) {
		friends.add(user);
	}
	
	public List<User> getFriends() {
		return friends;
	}
	
	public void removeFriendship(User user) {
		friends.remove(user);
	}
	
	
}
